{% extends "base.html" %}

{% block extrahead %}
<script type="text/javascript" src="/site_media/scripts/jquery/jquery.pack.js"></script>
<script type="text/javascript" src="/site_media/scripts/jquery/heartbeat.js"></script>
{% endblock %}


{% block bodyid %}waiting{% endblock %}


{% block bodycontent %}

<script type="text/javascript">
$(document).ready(function() {
		$.jheartbeat.set({
			url: "/api/sessionStatus/?sid={{ sid }}&pname={{ partName }}",
			delay: 3000
		}, function () {
			var statusText = document.getElementById('HeartBeatDIV').innerHTML;
			if(statusText == "Running"){
				location.href = "/session/drive/?sid={{ sid }}&pname={{ partName }}";
			}
			if(statusText == "Booted"){
				location.href = "/session/booted/?sid={{ sid }}&pname={{ partName }}";
			}
		});
	});

</script>

<div id="verticalCenter">
	<h1>{{ waitReason }}</h1>
	<p>Participant Name: {{ partName }}</p>
	<p><img src="/site_media/images/indicatorSnakeLarge.gif" width="32" height="32" alt="IndicatorSnakeLarge"></p>
</div>
{% endblock %}